# Maintainer: Ionut Biru <ibiru@archlinux.org>
# Maintainer: Jan de Groot <jgc@archlinux.org>
# Contributor: Gabriel Martinez < reitaka at gmail dot com >

pkgname=libusbmuxd
pkgver=1.0.10
pkgrel=2
pkgdesc="USB Multiplex Daemon"
url="http://marcansoft.com/blog/iphonelinux/usbmuxd/"
arch=('i686' 'x86_64')
license=('LGPL2.1' 'GPL2')
depends=('libusb' 'libplist')
conflicts=('usbmuxd<1.0.9')
source=(http://www.libimobiledevice.org/downloads/libusbmuxd-$pkgver.tar.bz2
	CVE-2016-5104.patch)
sha256sums=('1aa21391265d2284ac3ccb7cf278126d10d354878589905b35e8102104fec9f2'
            '9f3a84c8d0a32df13985f6574f5f0e86af435a67606612c0811df631070a97e3')

prepare() {
  cd libusbmuxd-${pkgver}
  patch -Np1 -i ../CVE-2016-5104.patch
}

build() {
  cd libusbmuxd-${pkgver}
  ./configure --prefix=/usr
  make
}

package() {
  cd libusbmuxd-${pkgver}
  make DESTDIR="${pkgdir}" install
}
